package zyl.spring.boot.branch.test.lamdba;

import org.junit.Test;

/**
 * LambdaTest4类说明: 测试
 *
 * @author z.y.l
 * @version v1.0
 * @date 2020-09-15
 */
public class LambdaTest4 {
    @FunctionalInterface
    interface Greet{
        void say(String s);
    }
    public static void sayHello(String name,Greet greet){
        greet.say(name);
    }
    @Test
    public void test(){
        LambdaTest4.sayHello("zyl", (x) -> System.out.println("hello " + x));
    }
}
